//
//  ViewController.m
//  KeyChainDemo
//
//  Created by 陈星妤 on 16/6/2.
//  Copyright © 2016年 陈星妤. All rights reserved.
//

#import "ViewController.h"
#import "JKRKeyChainTool.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
}

static NSString *KEY = @"KEY";

- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
    NSString *uuidStr = [JKRKeyChainTool getUUID];
    
    if (![JKRKeyChainTool objectForKey:KEY]) {
        [JKRKeyChainTool setObject:uuidStr forKey:KEY];
    }
    
    NSLog(@"%@", [JKRKeyChainTool objectForKey:KEY]);
}

@end
